package com.scu.bank.model.base;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BaseDao<T extends BaseEntity>{

    Long countByExample(Object example);

    int deleteByExample(Object example);

    int insert(T entity);

    int insertSelective(T entity);

    List<T> selectByExample(Object example);

    List<T> selectByExampleWithBLOBs(Object example);

    int deleteByPrimaryKey(String id);

    T selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") T entity, @Param("example") Object example);

    int updateByExample(@Param("record") T entity, @Param("example") Object example);

    int updateByPrimaryKeySelective(T entity);

    int updateByPrimaryKey(T entity);

    int updateByPrimaryKeyWithBLOBs(T entity);
}
